<template>
	<view class="container">
		<view class="item-box" v-for="(item,index) in list" :key="index">
			<view class="item-title">{{item.title}}</view>
			<view class="form-box">
				<view  v-for="(m,n) in item.child">
					<formItem :label="m.label" :key="n" v-model="form[m.model]" :disabled="disabled" titleType="dotted-title"></formItem>
				</view>				
			</view>
		</view>			
	</view>
</template>

<script>
	import formItem from '@/components/lt-formItem/index.vue'
	export default {
		props:{
			form:{type:Object,default:()=>{}}
		},
		components:{
			formItem
		},
		onLoad(){
			console.log('cusdetail',this.form)
		},
		data(){
			return {
				disabled:true,
				list:[
					{
						title:'客户基本信息',
						child:[
							{
								label:'客户姓名',
								model:'customerName'
							},{
								label:'客户类型',
								model:'customerType'
							},{
								label:'客户性别',
								model:'customerGender'
							},{
								label:'联系电话',
								model:'contactNumber'
							},{
								label:'车牌号',
								model:'carLicense'
							},{
								label:'派单时间',
								model:'deliveryTime'
							},{
								label:'投诉内容',
								model:'complaintContent'
							},
						]
					},
					{
						title:'投诉信息',
						child:[
							{
								label:'一级分类',
								model:'primaryClassification'
							},{
								label:'二级分类',
								model:'secondaryClassification'
							},{
								label:'三级分类',
								model:'threeLevelClassification'
							},{
								label:'省份',
								model:'province'
							},{
								label:'城市',
								model:'city'
							}
						]
					},
					{
						title:'车辆信息',
						child:[
							{
								label:'车系',
								model:'carSeries'
							},{
								label:'车型',
								model:'model'
							},{
								label:'VIN',
								model:'vin'
							},{
								label:'购车日期',
								model:'dateOfPurchase'
							},{
								label:'车辆配置',
								model:'vehicleConfiguration'
							},{
								label:'动力类型',
								model:'powerType'
							},{
								label:'ICCID',
								model:'iccid'
							},{
								label:'PDSN',
								model:'pdsn'
							},{
								label:'IMEI',
								model:'imei'
							}
						]
					},{
						title:'客户权益',
						child:[
							{
								label:'是否终身三电质保',
								model:'freeEleInsure'
							},{
								label:'是否终身整车质保',
								model:'freeVeInsure'
							},{
								label:'是否5年免费保养',
								model:'free5Maintenance'
							},{
								label:'是否终身免费保养',
								model:'freeLifeMaintenance'
							},{
								label:'是否终身免费救援',
								model:'freeLifeRescue'
							},{
								label:'是否购买升级服务包',
								model:'upgradePackage'
							},{
								label:'是否顶层CLUB会员',
								model:'clubMember'
							}
						]
					}
				]
			}				
		}
	}
</script>

<style lang="scss" scoped>
	.item-box{
		width: 100%;
		height: 100%;
		margin-top: 24upx;
		background-color: #fff;
		.item-title{
			width: 100%;
			height: 80upx;
			font-size: 30upx;
			line-height: 80upx;
			padding-left: 32upx;
			border-bottom: 1px solid #D9D9D9;
			color: #303030;
		}
		.form-box{
			padding:0 12upx 48upx 12upx ;
		}
	}	
</style>
